<?php

namespace App\Providers;

use App\Events\CouponAssign;
use App\Events\MasterAssureFund;
use App\Events\MasterCashed;
use App\Events\MasterOrderRefund;
use App\Events\MasterPunished;
use App\Events\MasterReturnFund;
use App\Events\MerchantOrderArbitrate;
use App\Events\MerchantOrderArbitrated;
use App\Events\MerchantOrderComplain;
use App\Events\MerchantOrderRefund;
use App\Events\MerchantRecharge;
use App\Events\OrderAppointed;
use App\Events\OrderArbitrated;
use App\Events\OrderComplained;
use App\Events\OrderDelivered;
use App\Events\OrderEmployed;
use App\Events\OrderEvaluated;
use App\Events\OrderFinished;
use App\Events\OrderOffered;
use App\Events\OrderRefunded;
use App\Events\OrderSuccess;
use App\Events\SmsSent;
use App\Events\Tested;
use App\Listeners\CouponAssignListener;
use App\Listeners\MasterAssureFundListener;
use App\Listeners\MasterCashedListener;
use App\Listeners\MasterOrderRefundListener;
use App\Listeners\MasterPunishedListener;
use App\Listeners\MasterReturnFundListener;
use App\Listeners\MerchantOrderArbitratedListener;
use App\Listeners\MerchantOrderArbitrateListener;
use App\Listeners\MerchantOrderComplainListener;
use App\Listeners\MerchantOrderRefundListener;
use App\Listeners\MerchantRechargeListener;
use App\Listeners\OrderAppointedListener;
use App\Listeners\OrderArbitratedListener;
use App\Listeners\OrderComplainedListener;
use App\Listeners\OrderDeliveredListener;
use App\Listeners\OrderEmployedListener;
use App\Listeners\OrderEvaluatedListener;
use App\Listeners\OrderFinishedListener;
use App\Listeners\OrderOfferedListener;
use App\Listeners\OrderRefundedListener;
use App\Listeners\OrderRefundListener;
use App\Listeners\OrderSuccessListener;
use App\Listeners\QueryExecutedListener;
use App\Listeners\SmsSentListener;
use App\Listeners\TestedListener;
use App\Models\Merchant;
use Illuminate\Database\Events\QueryExecuted;
use Illuminate\Support\Facades\Event;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;

class EventServiceProvider extends ServiceProvider
{
    /**
     * The event listener mappings for the application.
     *
     * @var array
     */
    protected $listen = [
        /**
         * 测试用
         */
        Tested::class => [
            TestedListener::class,
        ],

        /**
         * 发出数据库请求
         */
        QueryExecuted::class => [
            QueryExecutedListener::class,
        ],

        /**
         * 发送短信
         */
        SmsSent::class => [
            SmsSentListener::class,
        ],

        /**
         * 师傅对订单报价
         */
        OrderOffered::class => [
            OrderOfferedListener::class,
        ],

        /**
         * 商家已支付预付款雇佣师傅
         */
        OrderEmployed::class => [
            OrderEmployedListener::class,
        ],

        /**
         * 师傅已预约客户
         */
        OrderAppointed::class => [
            OrderAppointedListener::class,
        ],

        /**
         * 师傅已操作订单确认完成服务
         */
        OrderFinished::class => [
            OrderFinishedListener::class,
        ],

        /**
         * 订单完成商家已确认放款，或超过时限未确认系统自动放款
         */
        OrderSuccess::class => [
            OrderSuccessListener::class,
        ],

        /**
         * 订单退款给商家
         */
        OrderRefunded::class => [
            OrderRefundedListener::class,
        ],

        /**
         * 师傅提现转账
         */
        MasterCashed::class => [
            MasterCashedListener::class,
        ],

        /**
         * 投诉对师傅罚款
         */
        MasterPunished::class => [
            MasterPunishedListener::class,
        ],

        /**
         * 商家给订单/师傅评分
         */
        OrderEvaluated::class => [
            OrderEvaluatedListener::class,
        ],

        /**
         * 师傅操作商家退款请求
         */
        MasterOrderRefund::class => [
            MasterOrderRefundListener::class,
        ],

        /**
         * 订单退款客服仲裁
         */
        OrderArbitrated::class => [
            OrderArbitratedListener::class,
        ],

        /**
         * 订单投诉客服核实
         */
        OrderComplained::class => [
            OrderComplainedListener::class,
        ],

        /**
         * 商家发起退款
         */
        MerchantOrderRefund::class => [
            MerchantOrderRefundListener::class,
        ],

        /**
         * 商家申请仲裁
         */
        MerchantOrderArbitrate::class => [
            MerchantOrderArbitrateListener::class,
        ],

        /**
         * 商家发起投诉
         */
        MerchantOrderComplain::class => [
            MerchantOrderComplainListener::class,
        ],

        /**
         * 师傅申请退还质保金
         */
        MasterReturnFund::class => [
            MasterReturnFundListener::class,
        ],

        /**
         * 师傅缴纳质保金
         */
        MasterAssureFund::class => [
            MasterAssureFundListener::class,
        ],

        /**
         * 商家充值
         */
        MerchantRecharge::class => [
            MerchantRechargeListener::class,
        ],

        /**
         * 发放优惠券
         */
        CouponAssign::class => [
            CouponAssignListener::class,
        ],

        /**
         * 师傅已操作物流提货
         */
        OrderDelivered::class => [
            OrderDeliveredListener::class,
        ],
    ];

    /**
     * Register any events for your application.
     *
     * @return void
     */
    public function boot()
    {
        parent::boot();

        //
    }
}
